<include file="App/Tpl/Mobile/Public/header.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="__JS__/wdatepicker/WdatePicker.js" type="text/javascript" ></script>
<script>
function submitForm(){
	document.getElementById("submit").click();
	
}

function check(){
	if(document.getElementById("O_SRV_APPOINT_TIME").value==""){
		setText('alertTitle','预约时间必填');
		return false;
	}else{
		setText('alertTitle','');
	}
	return true;
}
function setText(id,text){
	document.getElementById(id).innerHTML="<img align='absmiddle' src='__JS__/validfrom/images/arrow2.gif'>"+text;
}

function getDay(m){
	var __year=document.getElementById("Year").value;
	var m=parseInt(m);
	var __day=31;
	if(m==4 || m==6 || m==9 || m==11){
		__day=30;
	}
	//计算闰年
	if(m==2){
		if((__year%4==0 && __year%100 !=0) || ( __year%400==0)){
			__day=29;
		}else{
			__day=28;
		}
	}
	
	var __dayObject=document.getElementById("Day");
	__dayObject.options.length=0;
	
	for(var i=1;i<=__day;i++){
		var __c=document.createElement("option");
		__c.value=i;
		__c.text=i;
		if(i==parseInt("{$CDay}")){
			__c.selected=true;
		}
		__dayObject.appendChild(__c);
	}
	
}

</script>
<div class="header">
	<div class="header_body">  
	   
	    <div class="header_center1">
	    	    <div style="width:100%; margin:0 auto; overflow:auto; _display:inline-block;">  
				    <div style="width:50px; float:right;padding-right:15px;padding-top:15px;cursor:pointer;">
				    	<img src="__PUBLIC__/images/mobile/reload.png" onclick="window.location.reload();">
				    </div>  
				    <div style="width:50px; float:left;padding-left:15px;padding-top:15px;cursor:pointer;">
				    <img src="__PUBLIC__/images/mobile/back.png" onclick="window.history.go(-1);">
				    </div>  
				    <div style=" margin-left:50px;margin-right:50px;height:50px;text-align:center;">
				    	<span style="font:bold 25px '微软雅黑';color:#FFFFFF;line-height:50px;">确定预约时间</span>
				    	<span style="font:bold 14px '微软雅黑';color:#FFFFFF;line-height:50px;"></span>
				    </div> 
				 </div>
	    </div> 
    </div>
</div>

<div class="content">
	<div style="font-size:20px;color:#B25151;text-align:left;padding-left:5px;padding-top:30px;font-weight:bold">服务单信息：</div>
	<div style="border:1px solid #DBDBDB;margin-left:5px;margin-top:10px;margin-right:5px;">
		<div style="margin:10px;">
		<div class="tableDiv"><span style="color:#4378AC">服务单编号：</span><span class="text">{$data.O_NO}</span></div>
		<div class="tableDiv"><span style="color:#4378AC">产品信息：</span></div>
		<div class="tableDiv"><span class="text">{$data.O_PRODUCT|default='无'}，数量 {$data.P_COUNT|default='无'}</span></div>
		<div class="tableDiv"><span style="color:#4378AC">安装方式：</span><span class="text">{$data.O_S_TYPE|getDictValueByKey='INSTALL_MODE',###}</span></div>
		
		<div class="tableDiv"><span style="color:#4378AC">服务地址：</span></div>
		<div class="tableDiv"><span class="text">	{$data.CU_NAME|default='无'}，{$data.O_MOBILE|default='无'}
               	<if condition="$data.O_PHONE neq ''">，{$data.O_PHONE|default='无'}</if>，{$data.O_AREA}
               	<if condition="$data.O_POSTCODE neq ''">，{$data.O_POSTCODE|default='无'}</if></span>
		</div>
		<div class="tableDiv"><span style="color:#4378AC">备注说明：</span></div>
		<div class="tableDiv"><span class="text">{$data.O_MEMO|default='无'}</span></div>
		</div>
	</div>
	
	<div style="border:1px solid #DBDBDB;margin-left:5px;margin-top:10px;margin-right:5px;">
		<div style="margin:10px;">
			<form action="" method="post">
				<div  class="tableFormDiv">
					<span style="color:#4378AC">预约时间：</span>
				</div>
				<div style="text-align:left;padding-top:3px;">
					<select id="Year" name="data[Year]" class="time2">
						<volist name="Year" id="vo">
							<option value="{$vo}" <if condition="$CYear eq $vo">selected</if>>{$vo}</option>
						</volist>
					</select>
					<select id="Month" name="data[Month]" onchange="getDay(this.value);" class="time1">
						<volist name="Month" id="vo">
							<option value="{$vo}" <if condition="$CMonth eq $vo">selected</if>>{$vo}</option>
						</volist>
					</select>
					<select id="Day" name="data[Day]" class="time1">
						
					</select>
					&nbsp;
					<select id="Hours" name="data[Hours]" class="time1">
						<volist name="Hours" id="vo">
							<option value="{$vo}" <if condition="$CHours eq $vo">selected</if>>{$vo}</option>
						</volist>
					</select>:
					<select id="Minutes" name="data[Minutes]"  class="time1">
						<volist name="Minutes" id="vo">
							<option value="{$vo}" <if condition="$CMinutes eq $vo">selected</if>>{$vo}</option>
						</volist>
					</select>
					<input class="inputText"  type="hidden" id="O_SRV_APPOINT_TIME" name="O_SRV_APPOINT_TIME" value="" >
					
				</div>
				<div style="text-align:left;padding-top:4px;color:#FFFFFF;cursor:pointer;font-size:15px;">
				<a href="?g=Mobile&m=Order&a=yy&O_ID={$O_ID}&ly=t" ><font color="#239001">[同要求时间]</font></a>
				</div>
				<div id="alertTitle" class="tableDiv" style="color:#B25151;font-size:15px;font-weight:bold;height:20px;"></div>
				<div >
				<div style="text-align:center;padding-top:10px;" align="center">
						<input type="hidden" id="O_ID" name="O_ID" value="{$O_ID}">
                    	<div style="display:none"><input type="submit" id="submit">
                    	<input type="hidden" name="op" value="1"></div>
                    	<input type="hidden" name="ly" value="{$ly}">
                    	<div style="display:none"><input type="button" value="确定预约上门时间" onclick="submitForm();" style="height:30px;width:180px;font-size:15px;"></div>
                    	<div class="button-blue" onclick="submitForm();">确定预约上门时间</div>
				</div>
				
			</form>
	</div>
</div>
</div>

<br />
<br />
<script>
getDay("{$CMonth}");
</script>
<include file="App/Tpl/Mobile/Public/footer.html" />